80800000	load and jump to "gameplay"
	accepts: A0=p->manager[80229050], A1=
ADDIU	SP,SP,FFE8
SW	RA,0014 (SP)
LUI	AT,8012
SW	A1,6EB4 (AT)	;A1->80126EB4: 
SB	R0,009F (A0)	;0->manager+9F: load binary
LUI	T6,8080
ADDIU	T6,T6,32F8	;T6=808032F8: gameplay
ADDIU	T7,R0,2410	;T7=2410
SW	T7,0010 (A0)	;2410->manager+10: size(?)
SW	T6,000C (A0)	;808023F8->manager+C: entrypoint/loaded binary correction ID
JAL	800946D0
NOP
LUI	AT,8013
JAL	800968C0
SW	R0,75F4 (AT)	;0->801375F4: 
ADDIU	T8,R0,0001
LUI	AT,8013
SB	T8,6FE0 (AT)	;1->80136FE0: map acquired(?)
LW	RA,0014 (SP)
ADDIU	SP,SP,0018
JR	RA
NOP

80800058
SW	A0,0000 (SP)
ANDI	A0,A0,00FF
BEQ	A0,R0,80800070
ADDIU	V1,R0,0020
ADDIU	V1,A0,0090
ANDI	V1,V1,00FF
OR	V0,V1,R0
JR	RA
NOP

8080007C
SW	A0,0000 (SP)
ANDI	A0,A0,00FF
ADDIU	AT,R0,0020
BEQ	A0,AT,80800098
OR	V1,R0,R0
ADDIU	V1,A0,FF70
ANDI	V1,V1,00FF
OR	V0,V1,R0
JR	RA
NOP

808000A4
ADDIU	SP,SP,FFE8
LUI	V0,8013
ADDIU	V0,V0,6EA0	;V0=80136EA0: runtime variables
SW	RA,0014 (SP)
LW	V1,05A0 (V0)
LBU	T6,011E (V0)	;T6=80136FBE: hours
LBU	T8,011D (V0)	;T8=80136FBD: minutes
SLL	T3,V1,0x2
SLL	T7,T6,0x3
LUI	T4,8080
SUBU	T3,T3,V1
SUBU	T7,T7,T6
SLL	T7,T7,0x5
SLL	T3,T3,0x2	;T3=V1*C: ->offset
ADDIU	T4,T4,1B60	;T4=80801B60: p->option table
SLL	T9,T8,0x4
LBU	T1,011C (V0)	;T1=80136FBC: seconds
ADDU	A2,T3,T4	;A2=options+offset
ADDU	T7,T7,T6
SUBU	T9,T9,T8
LW	A3,0004 (A2)	;A3=A2+4: option.handler
SLL	T9,T9,0x2	;T9=minutes*60 ->seconds
SLL	T7,T7,0x4	;T7=hours*3600: ->seconds
ADDU	T0,T7,T9	;T0=hours+minutes
ADDU	T2,T0,T1	;T2=hours+minutes+seconds: total #seconds elapsed
BEQ	A3,R0,80800120	;skip if no handler
SW	T2,0118 (V0)	;T2->80136FB8: save compiled time
JALR	RA,A3
LW	A1,0008 (A2)	;A1=A2+8: option.number
LUI	V0,8013
ADDIU	V0,V0,6EA0	;V0=80136EA0: runtime variables
//80800120:
ADDIU	T5,R0,FFFF
SW	T5,05A0 (V0)	;-1 -> manager+5A0: 
//80800128:	return
LW	RA,0014 (SP)
ADDIU	SP,SP,0018
JR	RA
NOP

80800138
	accepts: A0=
ADDIU	SP,SP,FFD8
SW	S2,001C (SP)
LUI	S2,8013
SW	S3,0020 (SP)
OR	S3,A0,R0	;S3=A0: 
ADDIU	S2,S2,6EA0	;S2=80136EA0: runtime variables
SW	RA,0024 (SP)
SW	S1,0018 (SP)
SW	S0,0014 (SP)
LBU	T6,011E (S2)	;T6=80136FBE: hours
LBU	T8,011D (S2)	;T8=80136FBD: minutes
LBU	T1,011C (S2)	;T1=80136FBC: seconds
SLL	T7,T6,0x3
SUBU	T7,T7,T6
SLL	T7,T7,0x5
SLL	T9,T8,0x4
ADDU	T7,T7,T6
SUBU	T9,T9,T8
SLL	T9,T9,0x2	;T9=minutes*60 ->seconds
SLL	T7,T7,0x4	;T7=hours*3600: ->seconds
ADDU	T0,T7,T9	;T0=hours+minutes
ADDU	T2,T0,T1	;T2=hours+minutes+seconds: total #seconds elapsed
SW	T2,0118 (S2)	;T2->80136FB8: save compiled time
LW	V0,021C (S3)
LUI	T4,8080
ADDIU	T4,T4,1B60	;T4=80801B60: p->option table
SLL	T3,V0,0x2
SUBU	T3,T3,V0
SLL	T3,T3,0x2
ADDU	V1,T3,T4
LW	A2,0004 (V1)
OR	A0,S3,R0
BEQ	A2,R0,808001CC
NOP
JALR	RA,A2
LW	A1,0008 (V1)	;A1=V1+8: option.number
LW	V0,021C (S3)
LUI	V1,8014
ADDIU	V1,V1,8E50	;V1=80138E50: 
LW	T5,0000 (V1)
OR	S1,S3,R0
ADDIU	T9,R0,0001
SH	V0,1434 (T5)
LW	T8,0000 (V1)
LW	T6,0220 (S3)
ADDIU	S3,R0,0006
OR	S0,R0,R0
SH	T6,1436 (T8)
LBU	T7,011D (S2)	;T7=80136FBD: minutes
BNE	T7,R0,80800208
NOP
SB	T9,0128 (S2)
JAL	80800058
LBU	A0,022C (S1)
LW	T0,0138 (S2)
ADDIU	S1,S1,0001
ADDU	T1,T0,S0
ADDIU	S0,S0,0001
BNE	S0,S3,80800208
SB	V0,0000 (T1)
ADDIU	V0,R0,0001
LW	RA,0024 (SP)
LW	S0,0014 (SP)
LW	S1,0018 (SP)
LW	S2,001C (SP)
LW	S3,0020 (SP)
JR	RA
ADDIU	SP,SP,0028

80800248	handle leaving debug from either pane
	accepts: A0=p->manager
ADDIU	SP,SP,FFE8
SW	RA,0014 (SP)
SW	A0,0018 (SP)	;SP+18=A0: p->manager
LW	T6,0018 (SP)	;T6=p->manager
LW	T7,0208 (T6)	;T7=manager+208: cur.interface
BNE	T7,R0,80800294	;branch if in settings pane(?)
NOP
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
ADDIU	A0,R0,1000	;A0= Start
BNE	V0,R0,80800284	;branch if pressed
NOP
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
ORI	A0,R0,8000	;A0= A button
BEQL	V0,R0,808002B8	;branch if not pressed
OR	V0,R0,R0
//80800284:	handle option selection
JAL	80800138
LW	A0,0018 (SP)
BEQ	R0,R0,808002BC
LW	RA,0014 (SP)
//80800294:	settings pane only catches Start
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
ADDIU	A0,R0,1000	;A0= Start
BEQL	V0,R0,808002B8	;branch if not pressed
OR	V0,R0,R0
JAL	80800138
LW	A0,0018 (SP)
BEQ	R0,R0,808002BC
LW	RA,0014 (SP)
//808002B4:	default return value is 0
OR	V0,R0,R0
//808002B8:	return
LW	RA,0014 (SP)
ADDIU	SP,SP,0018
JR	RA
NOP

808002C8	advance selection 1: Real-Time Clock
SW	A0,0000 (SP)
OR	V0,R0,R0
JR	RA
NOP

808002D8	advance selection 2: time/date
SW	A0,0000 (SP)
OR	V0,R0,R0
JR	RA
NOP

808002E8	advance selection 3: step
SW	A0,0000 (SP)
OR	V0,R0,R0
JR	RA
NOP

808002F8	advance selection 4: weather
SW	A0,0000 (SP)
LUI	A0,8013
ADDIU	A0,A0,6EA0	;A0=80136EA0: runtime variables
LH	V1,056C (A0)	;V1=8013740C: weather
ADDIU	T6,R0,0003
OR	V0,R0,R0
ADDIU	V1,V1,0001	;V1++
SLTI	AT,V1,0005	;TRUE if 0-4
BEQL	AT,R0,8080032C
OR	V1,R0,R0
BGEZL	V1,80800330
SH	V1,056C (A0)
OR	V1,R0,R0	;V1=reset to 0
//8080032C:	update weather and time of day/season(?)
SH	V1,056C (A0)	;update value
SH	T6,056E (A0)	;3->8013740E: 
SLL	T8,V1,0x4
ORI	T9,T8,0003	;T9=weather*10 | 3
LUI	AT,8013
SB	T9,62D9 (AT)	;T9->801362D9: time:???
JR	RA
NOP

8080034C	advance selection 5: gender
SW	A0,0000 (SP)
LUI	A0,8013
LW	A0,6FD8 (A0)	;A0=80136FD8: p->playerdata
OR	V0,R0,R0
LB	V1,0010 (A0)	;V1=playerdata+10: gender
ADDIU	V1,V1,0001	;V1++
BGEZ	V1,80800378	;branch if nice, valid number
ANDI	V1,V1,0001	;V1&=1: limit to 2 genders
BEQ	V1,R0,80800378
NOP
ADDIU	V1,V1,FFFE
//80800378:	return
SB	V1,0010 (A0)	;update value
JR	RA
NOP

80800384	advance selection 6: face type
SW	A0,0000 (SP)
LUI	A0,8013
LW	A0,6FD8 (A0)	;A0=80136FD8: p->playerdata
OR	V0,R0,R0
LB	V1,0011 (A0)	;V1=playerdata+11: face type
ADDIU	V1,V1,0001	;V1++
BGEZ	V1,808003B0	;branch if a nice, valid number
ANDI	V1,V1,0007	;V1&=7: limits to 8 faces
BEQ	V1,R0,808003B0	;will never branch...
NOP
ADDIU	V1,V1,FFF8	;V1-=8, which would only cause issues
//808003B0:	return
SB	V1,0011 (A0)	;update value
JR	RA
NOP

808003BC	advance selection 7: bee sting status
SW	A0,0000 (SP)
LUI	A0,8013
ADDIU	A0,A0,6EA0	;A0=80136EA0: runtime variables
LB	V1,0A38 (A0)	;V1=801378D8: beesting register
OR	V0,R0,R0
BEQL	V1,R0,808003E4	;branch if 0
ADDIU	V1,R0,0001
BEQ	R0,R0,808003E4	;branch if 1
OR	V1,R0,R0
ADDIU	V1,R0,0001
//808003E4:	essentially same as XOR V1...
SB	V1,0A38 (A0)	;toggle value
JR	RA
NOP

808003F0	advance selection 8: data source
SW	A0,0000 (SP)
LUI	A0,8013
ADDIU	A0,A0,6EA0	;A0=80136EA0: runtime variables
LB	V1,07E0 (A0)	;V1=80137680: data source
OR	V0,R0,R0
BEQL	V1,R0,80800418	;branch if 0
ADDIU	V1,R0,0001
BEQ	R0,R0,80800418	;branch if 1
OR	V1,R0,R0
ADDIU	V1,R0,0001
//80800418:	essentially same as XOR V1...
SB	V1,07E0 (A0)	;toggle value
JR	RA
NOP

80800424	advance selection 9: shirt
SW	A0,0000 (SP)
OR	V0,R0,R0
JR	RA
NOP

80800434	advance selection 10: event
SW	A0,0000 (SP)
OR	V0,R0,R0
JR	RA
NOP

80800444	advance setting when A pressed
	accepts: A0=p->manager
ADDIU	SP,SP,FFE8
SW	RA,0014 (SP)
SW	A0,0018 (SP)	;SP+18=A0: p->manager
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
ORI	A0,R0,8000	;A0= A button
BEQ	V0,R0,80800484	;branch if not pressed
LW	A0,0018 (SP)	;A0=p->manager
LW	T6,0210 (A0)	;T6=A0+210: selected option
LUI	T9,8080
SLL	T7,T6,0x2	;T7=T6*4: selection->offset
ADDU	T9,T9,T7
LW	T9,1D04 (T9)	;T9=80801D04+offset: handler
JALR	RA,T9		;jump to handler
NOP
BEQ	R0,R0,8080048C
LW	RA,0014 (SP)
//80800484:	by default return V0=0
OR	V0,R0,R0
//80800488:	return
LW	RA,0014 (SP)
ADDIU	SP,SP,0018
JR	RA
NOP

80800498	settings interface; V0=1 if moved to options pane
ADDIU	SP,SP,FFE8
SW	RA,0014 (SP)
OR	A1,A0,R0
ADDIU	A0,R0,0200	;A0= +left
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
SW	A1,0018 (SP)
BEQ	V0,R0,808004C4	;skip if not pressed
LW	A1,0018 (SP)
SW	R0,0208 (A1)	;0->manager+208: set interface: options pane
BEQ	R0,R0,8080052C	;return 1 if move to options pane
ADDIU	V0,R0,0001	;V0=1
//808004C4:	previous option up
ADDIU	A0,R0,0800	;A0= +up
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
SW	A1,0018 (SP)
BEQ	V0,R0,808004F8	;skip if not pressed
LW	A1,0018 (SP)
LW	V0,0210 (A1)	;V0=A1+210: selected setting
ADDIU	T6,R0,0009
BNE	V0,R0,808004F0	;subtract 1
ADDIU	T7,V0,FFFF	;T7=setting-1
BEQ	R0,R0,80800528	;if at 0, roll around
SW	T6,0210 (A1)	;update selection
//808004F0:
BEQ	R0,R0,80800528
SW	T7,0210 (A1)	;update selection
//808004F8:	next option down
ADDIU	A0,R0,0400	;A0= +down
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
SW	A1,0018 (SP)
BEQ	V0,R0,80800528	;return if not pressed
LW	A1,0018 (SP)
LW	T8,0210 (A1)	;T8=A1+210: selected setting
ADDIU	AT,R0,000A
ADDIU	T9,T8,0001	;T9=setting+1
DIV	T9,AT
MFHI	T0		;T0=setting%10
SW	T0,0210 (A1)	;update selection
NOP
//80800528:	V0=0 if remain on settings pane
OR	V0,R0,R0
//8080052C:	return
LW	RA,0014 (SP)
ADDIU	SP,SP,0018
JR	RA
NOP

8080053C
BGEZ	A0,8080054C
SLTI	AT,A0,0023
BEQ	R0,R0,80800558
ADDIU	A0,A0,0023
BNEL	AT,R0,8080055C
OR	V0,A0,R0
ADDIU	A0,A0,FFDD
OR	V0,A0,R0
JR	RA
NOP

80800564
ADDIU	SP,SP,FFE8
SW	RA,0014 (SP)
SW	A0,0018 (SP)
LW	T6,0018 (SP)
ADDIU	AT,R0,0023
LW	V0,0220 (T6)
ADDIU	A3,V0,000E
DIV	A3,AT
MFHI	A3
SLT	AT,V0,A3
BEQ	AT,R0,808005B8
OR	V1,V0,R0
SLT	AT,V0,A1
BEQ	AT,R0,808005A8
SLT	AT,A1,A3
BNEL	AT,R0,808005DC
LW	T7,0018 (SP)
JAL	8080053C
ADDU	A0,V1,A2
BEQ	R0,R0,808005D8
OR	V1,V0,R0
SLT	AT,V1,A1
BNE	AT,R0,808005D8
SLT	AT,A1,A3
BNEL	AT,R0,808005DC
LW	T7,0018 (SP)
JAL	8080053C
ADDU	A0,V1,A2
OR	V1,V0,R0
LW	T7,0018 (SP)
SW	V1,0220 (T7)
LW	RA,0014 (SP)
JR	RA
ADDIU	SP,SP,0018

808005EC
ADDIU	SP,SP,FFD8
SW	S2,0020 (SP)
OR	S2,A0,R0
SW	RA,0024 (SP)
SW	S1,001C (SP)
SW	S0,0018 (SP)
LW	T6,0214 (S2)
ADDIU	A0,R0,0001
ADDU	S1,T6,A1
BLTZ	S1,80800620
SUBU	V0,R0,S1
BEQ	R0,R0,80800620
OR	V0,S1,R0
SLTI	AT,V0,0020
BNEL	AT,R0,80800690
SW	S1,0214 (S2)
JAL	800D1A9C
LW	S0,021C (S2)
BLEZ	S1,80800664
ADDIU	A0,S0,FFFF
OR	S1,R0,R0
JAL	8080053C
ADDIU	A0,S0,0001
OR	S0,V0,R0
OR	A0,S2,R0
OR	A1,V0,R0
JAL	80800564
ADDIU	A2,R0,0001
BEQ	R0,R0,80800684
ADDIU	T7,R0,0006
JAL	8080053C
OR	S1,R0,R0
OR	S0,V0,R0
OR	A0,S2,R0
OR	A1,V0,R0
JAL	80800564
ADDIU	A2,R0,FFFF
ADDIU	T7,R0,0006
SW	T7,0218 (S2)
SW	S0,021C (S2)
SW	S1,0214 (S2)
LW	RA,0024 (SP)
LW	S0,0018 (SP)
LW	S1,001C (SP)
LW	S2,0020 (SP)
JR	RA
ADDIU	SP,SP,0028

808006A8
ADDIU	SP,SP,FFE0
SW	S0,0018 (SP)
OR	S0,A0,R0
SW	RA,001C (SP)
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
ADDIU	A0,R0,0800	;A0= +up
BEQ	V0,R0,808006EC	;branch if not pressed
OR	A0,S0,R0
LW	T6,0214 (S0)
BLEZ	T6,808006D8
NOP
SW	R0,0214 (S0)
//808006D8:
JAL	808005EC
ADDIU	A1,R0,FFE0
ADDIU	T7,R0,0001
BEQ	R0,R0,80800760
SW	T7,0218 (S0)
//808006EC:
JAL	80078D30	;V0=TRUE if buttons A0 pressed on controller 1
ADDIU	A0,R0,0800	;A0= +up
BEQ	V0,R0,80800714
NOP
LW	A1,0218 (S0)
OR	A0,S0,R0
JAL	808005EC
SUBU	A1,R0,A1
BEQ	R0,R0,80800764
LW	RA,001C (SP)
//80800714:
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
ADDIU	A0,R0,0400	;A0= +down
BEQ	V0,R0,80800748	;branch if not pressed
OR	A0,S0,R0
LW	T8,0214 (S0)
BGEZ	T8,80800734
NOP
SW	R0,0214 (S0)
//80800734:
JAL	808005EC
ADDIU	A1,R0,0020
ADDIU	T9,R0,0001
BEQ	R0,R0,80800760
SW	T9,0218 (S0)
//80800748:
JAL	80078D30	;V0=TRUE if buttons A0 pressed on controller 1
ADDIU	A0,R0,0400	;A0= +down
BEQ	V0,R0,80800760
OR	A0,S0,R0
JAL	808005EC
LW	A1,0218 (S0)
//80800760:	return
LW	RA,001C (SP)
LW	S0,0018 (SP)
ADDIU	SP,SP,0020
JR	RA
NOP

80800774	interface 0: options pane
	accepts: A0=p->manager
ADDIU	SP,SP,FFE8
SW	RA,0014 (SP)
SW	A0,0018 (SP)
JAL	80800248	;detect leaving debug
LW	A0,0018 (SP)
ADDIU	AT,R0,0001
BEQL	V0,AT,808007BC
LW	RA,0014 (SP)
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
ADDIU	A0,R0,0100	;A0= +right
BEQ	V0,R0,808007B0	;branch if not pressed
LW	T7,0018 (SP)
ADDIU	T6,R0,0001
BEQ	R0,R0,808007B8
SW	T6,0208 (T7)	;1->manager+208: set interface: settings pane
//808007B0:
JAL	808006A8
LW	A0,0018 (SP)
//808007B8:	return
LW	RA,0014 (SP)
ADDIU	SP,SP,0018
JR	RA
NOP

808007C8	interface 1: settings pane
	accepts: A0=p->manager
ADDIU	SP,SP,FFE8
SW	RA,0014 (SP)
SW	A0,0018 (SP)	;SP+18=A0: p->manager
JAL	80800248	;detect leaving debug
LW	A0,0018 (SP)	;A0=p->manager
ADDIU	AT,R0,0001
BEQL	V0,AT,80800808	;return if exitting pane
LW	RA,0014 (SP)
JAL	80800498	;settings interface; V0=1 if switching to options
LW	A0,0018 (SP)	;A0=p->manager
ADDIU	AT,R0,0001
BEQL	V0,AT,80800808	;return if moving to options pane
LW	RA,0014 (SP)
JAL	80800444	;advance setting when A pressed
LW	A0,0018 (SP)	;A0=p->manager
//80800804:	return
LW	RA,0014 (SP)
ADDIU	SP,SP,0018
JR	RA
NOP

80800814	alter year
	accepts: A0=increment/decrement
LUI	V1,8013
ADDIU	V1,V1,6EA0	;V1=80136EA0: runtime variables
LHU	V0,0122 (V1)	;V0=runtime+122: year
ADDU	V0,V0,A0	;V0+=A0: increment year
SLTI	AT,V0,0834
BNEL	AT,R0,8080083C	;branch if < 2100
SLTI	AT,V0,076D
BEQ	R0,R0,80800848
ADDIU	V0,V0,FF39	;V0-=C7: -199, forcing it down a couple centuries
//80800838:	test if within bounds
SLTI	AT,V0,076D
BEQL	AT,R0,8080084C	;branch if > 1900
SH	V0,0122 (V1)
ADDIU	V0,V0,00C7	;V0+=C7: +199, forcing it up a couple centuries
//80800848:	return
SH	V0,0122 (V1)
JR	RA
NOP

80800854	alter month
	accepts: A0=increment/decrement
ADDIU	SP,SP,FFE0
LUI	A2,8013
ADDIU	A2,A2,6EA0	;A2=80136EA0: runtime variables
SW	RA,0014 (SP)
LBU	V1,0121 (A2)	;V1=runtime+121: month
ADDIU	AT,R0,000D
ADDU	V1,V1,A0	;V1+=A0: increment month
DIV	V1,AT
MFHI	V1		;V1%=0xD: 0-C
BNEL	V1,R0,80800894	;branch if not 0
SB	V1,0121 (A2)
BLEZ	A0,80800890
ADDIU	V1,R0,000C
BEQ	R0,R0,80800890	;if 0, force to 1 (January)
ADDIU	V1,R0,0001
//80800890:	update day of new month
SB	V1,0121 (A2)	;update month
LHU	A0,0122 (A2)	;A0=runtime+122: year
LBU	A1,0121 (A2)	;A1=runtime+121: month
JAL	800D5104
SW	V1,001C (SP)	;SP+1C=V1: month
LUI	A2,8013
ADDIU	A2,A2,6EA0	;A2=80136EA0: runtime variables
LBU	T6,011F (A2)	;T6=runtime+11F: day of month
LW	V1,001C (SP)	;V1=SP+1C: month
LUI	T8,8080
SLT	AT,V0,T6
BEQ	AT,R0,808008CC	;don't update day of month if T6 < V0
SLL	T7,V1,0x2
LUI	AT,8013
SB	V0,6FBF (AT)	;V0->80136FBF: day of month
//808008CC:
ADDU	T8,T8,T7
LW	T8,1D2C (T8)	;T8=80801D2C+offset: 
SW	T8,010C (A2)	;T8->runtime+10C: 
LW	RA,0014 (SP)
JR	RA
ADDIU	SP,SP,0020

808008E4	alter day
	accepts: A0=increment/decrement
ADDIU	SP,SP,FFE8
LUI	A2,8013
ADDIU	A2,A2,6EA0	;A2=80136EA0: runtime variables
SW	RA,0014 (SP)
SW	A0,0018 (SP)	;SP+18=A0: increment/decrement
LHU	A0,0122 (A2)	;A0=runtime+122: year
JAL	800D5104	;V0=day of month A1 for year A0
LBU	A1,0121 (A2)	;A1=runtime+121: month
LUI	A2,8013
ADDIU	A2,A2,6EA0	;A2=80136EA0: runtime variables
LW	A1,0018 (SP)	;A1=SP+18: increment/decrement
LBU	V1,011F (A2)	;V1=runtime+11F: day of month
ADDIU	T7,V0,0001
OR	A0,V0,R0	;A0=V0: calculated day of month
ADDU	T6,V1,A1	;T6=day of month+increment
DIV	T6,T7
MFHI	V1		;V1=new % calced
BNE	T7,R0,80800934	;catch division by zero
NOP
BREAK	00001C00
//80800934:	catch bad division
ADDIU	AT,R0,FFFF
BNE	T7,AT,8080094C	;catch -1 divisor
LUI	AT,8000
BNE	T6,AT,8080094C	;catch -0 divisor
NOP
BREAK	00001800
//8080094C:	handle day 0
BNEL	V1,R0,80800968	;use value if nonzero
SB	V1,011F (A2)
BLEZ	A1,80800964	;use the calced value if decrement
OR	V1,A0,R0
BEQ	R0,R0,80800964	;default to 1 otherwise
ADDIU	V1,R0,0001
//80800964:	update day of month and return
SB	V1,011F (A2)	;update day of month
LW	RA,0014 (SP)
ADDIU	SP,SP,0018
JR	RA
NOP

80800978	alter hours
	accepts: A0=increment/decrement
LUI	V1,8013
ADDIU	V1,V1,6EA0	;V1=80136EA0: runtime variables
LBU	V0,011E (V1)	;V0=runtime+11E: hours
ADDIU	AT,R0,0018
BNEL	V0,R0,808009A4	;branch if not 0
ADDU	V0,V0,A0
BGEZL	A0,808009A4	;branch if increment, not decrement
ADDU	V0,V0,A0
BEQ	R0,R0,808009B4	;force to 23
ADDIU	V0,R0,0017
//808009A0:
ADDU	V0,V0,A0	;V0+=A0: increment hours
DIV	V0,AT
MFHI	V0		;V0%=24: within hours bounds
NOP
NOP
//808009B4:	update hours and return
SB	V0,011E (V1)	;update hours
JR	RA
NOP

808009C0	alter minutes
	accepts: A0=increment/decrement
LUI	V1,8013
ADDIU	V1,V1,6EA0	;V1=80136EA0: runtime variables
LBU	V0,011D (V1)	;V0=runtime+11D: minutes
ADDIU	AT,R0,003C
BNEL	V0,R0,808009EC	;branch if nonzero
ADDU	V0,V0,A0
BGEZL	A0,808009EC	;branch if increment, not decrement
ADDU	V0,V0,A0
BEQ	R0,R0,808009FC	;force to 59
ADDIU	V0,R0,003B
//808009E8:	keep minutes within bounds
ADDU	V0,V0,A0	;V0+=A0: increment minutes
DIV	V0,AT
MFHI	V0		;V0%=60: within minute bounds
NOP
NOP
//808009FC:	update and return
SB	V0,011D (V1)	;update minutes
JR	RA
NOP

80800A08
ADDIU	SP,SP,FFE8
SW	RA,0014 (SP)
BEQ	A0,R0,80800A4C
LUI	A1,8080
LUI	A0,8013
ADDIU	A0,A0,6FBC
JAL	800D5480
ADDIU	A1,A1,1D60
ADDIU	AT,R0,05A0
DIVU	V0,AT
MFLO	T6
ADDIU	T7,T6,0006
ADDIU	AT,R0,0007
DIVU	T7,AT
MFHI	T8
LUI	AT,8013
SB	T8,6FC0 (AT)
LW	RA,0014 (SP)
ADDIU	SP,SP,0018
JR	RA
NOP

80800A5C	interface 2: alter time/date
	accepts: A0=p->manager
ADDIU	SP,SP,FFD8
SW	S2,0020 (SP)
OR	S2,A0,R0	;S2=A0: p->manager
SW	RA,0024 (SP)
SW	S1,001C (SP)
SW	S0,0018 (SP)
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
ORI	A0,R0,8000	;A0= A button
BNEL	V0,R0,80800A94	;branch if pressed
ADDIU	V0,R0,0001
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
ADDIU	A0,R0,1000	;A0= Start
BEQ	V0,R0,80800ABC	;branch if not pressed
ADDIU	V0,R0,0001
//80800A94:
SW	V0,0208 (S2)	;V0->manager+208: set cur.interface
LUI	T6,8013
LW	T6,6FCC (T6)	;T6=80136FCC: 
LUI	A0,8013
BNEL	V0,T6,80800C28	;return if not 1
LW	RA,0024 (SP)
JAL	800D5004
ADDIU	A0,A0,6FBC	;A0=80136FBC: seconds
BEQ	R0,R0,80800C28
LW	RA,0024 (SP)
//80800ABC:	backtrack selected time component
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
ADDIU	A0,R0,0200	;A0= +left
BEQ	V0,R0,80800AEC	;branch if not pressed
NOP
LW	V0,020C (S2)	;V0=S2+20C: selected time component
ADDIU	T7,R0,0004
BNE	V0,R0,80800AE4	;if > 0, subtract 1
ADDIU	T8,V0,FFFF
BEQ	R0,R0,80800C24	;else set to 4
SW	T7,020C (S2)	;update selected time component
//80800AE4:
BEQ	R0,R0,80800C24
SW	T8,020C (S2)	;update selected time component
//80800AEC:	advance selected time component
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
ADDIU	A0,R0,0100	;A0= +right
BEQ	V0,R0,80800B1C	;branch if not pressed
OR	S1,R0,R0
LW	T9,020C (S2)	;T9=S2+20C: selected time component
ADDIU	AT,R0,0005
ADDIU	T0,T9,0001	;T0=T9+1
DIV	T0,AT
MFHI	T1		;T1=T0%5: 0-4
SW	T1,020C (S2)	;update selected time component
BEQ	R0,R0,80800C28
LW	RA,0024 (SP)
//80800B1C:	decrement selection
JAL	80078D30	;V0=TRUE if buttons A0 pressed on controller 1
ADDIU	A0,R0,0400	;A0= +down
BEQ	V0,R0,80800B60	;branch if not pressed
NOP
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
ADDIU	A0,R0,0400	;A0= +down
BEQ	V0,R0,80800B44	;branch if not pressed
ADDIU	T2,R0,FFF0
SW	T2,0228 (S2)
ADDIU	S1,R0,FFFF	;S1=-1: decrement
//80800B44:
LW	T3,0228 (S2)
ADDIU	AT,R0,0006
ADDIU	T4,T3,0001
BNE	T4,AT,80800B60
SW	T4,0228 (S2)
SW	R0,0228 (S2)
ADDIU	S1,R0,FFFF	;S1=-1: decrement
//80800B60:	increment selection
JAL	80078D30	;V0=TRUE if buttons A0 pressed on controller 1
ADDIU	A0,R0,0800	;A0= +up
BEQ	V0,R0,80800BA4
NOP
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
ADDIU	A0,R0,0800	;A0= +up
BEQ	V0,R0,80800B88	;branch if not pressed
ADDIU	T6,R0,0010
SW	T6,0228 (S2)
ADDIU	S1,R0,0001	;S1=1: increment
//80800B88:
LW	T7,0228 (S2)
ADDIU	AT,R0,FFFA
ADDIU	T8,T7,FFFF
BNE	T8,AT,80800BA4
SW	T8,0228 (S2)
SW	R0,0228 (S2)
ADDIU	S1,R0,0001	;S1=1: increment
//80800BA4:
JAL	80078D30	;V0=TRUE if buttons A0 pressed on controller 1
ADDIU	A0,R0,4000	;A0=B button
BEQ	V0,R0,80800BC4	;branch if not pressed
OR	S0,R0,R0
ADDU	AT,S1,R0
SLL	S1,S1,0x2
ADDU	S1,S1,AT
SLL	S1,S1,0x1	;S1*=0xA: increment by tens
//80800BC4:
LW	T0,020C (S2)	;T0=S2+20C: selected time component
SLL	T1,S0,0x2
LUI	T9,8080
BNE	S0,T0,80800BF0
ADDU	T9,T9,T1
LW	T9,1D68 (T9)	;T9=80801D68+offset: pointer table: alter date component routines
OR	A0,S1,R0	;A0=increment/decrement
JALR	RA,T9
NOP
//80800BE8:
JAL	80800A08
OR	A0,S1,R0
//80800BF0:
ADDIU	S0,S0,0001
ADDIU	AT,R0,0005
BNEL	S0,AT,80800BC8
LW	T0,020C (S2)	;T0=S2+20C: selected time component
BEQ	S1,R0,80800C24
LUI	T2,8013
LW	T2,6FCC (T2)	;T2=80136FCC: 
ADDIU	V0,R0,0001
LUI	A0,8013
BNEL	V0,T2,80800C28	;return if not 1
LW	RA,0024 (SP)
JAL	800D5004
ADDIU	A0,A0,6FBC	;A0=80136FBC: seconds
//80800C24:	return
LW	RA,0024 (SP)
LW	S0,0018 (SP)
LW	S1,001C (SP)
LW	S2,0020 (SP)
JR	RA
ADDIU	SP,SP,0028

80800C3C	interface 3: alter shirt
	accepts: A0=p->manager
ADDIU	SP,SP,FFE0
SW	RA,0014 (SP)
OR	A1,A0,R0	;A1=A0: p->manager
ORI	A0,R0,8000	;A0= A button
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
SW	A1,0020 (SP)	;SP+20=A1: p->manager
BNE	V0,R0,80800C70	;branch if pressed
LW	A1,0020 (SP)	;A1=p->manager
ADDIU	A0,R0,1000	;A0= Start
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
SW	A1,0020 (SP)	;SP+20=A1: p->manager
BEQ	V0,R0,80800C7C	;branch if not pressed
LW	A1,0020 (SP)	;A1=p->manager
//80800C70:	return to settings pane
ADDIU	T6,R0,0001
BEQ	R0,R0,80800DD0
SW	T6,0208 (A1)	;1->manager+208: set interface: settings pane
//80800C7C:	test if holding B for quick advance
LUI	T7,8013
LW	T7,6FD8 (T7)	;T7=80136FD8: p->playerdata
ADDIU	A0,R0,4000	;A0=B button
LHU	V1,0A78 (T7)	;V1=playerdata+A78: shirt ID#
SW	A1,0020 (SP)	;SP+20=A1: p->manager
ADDIU	V1,V1,DBFF	;V1-=2401: shirt#
JAL	80078D30	;V0=TRUE if buttons A0 pressed on controller 1
SW	V1,001C (SP)	;SP+1C=V1: shirt#
LW	V1,001C (SP)	;V1=shirt#
BEQ	V0,R0,80800CB0	;branch if not pressed
LW	A1,0020 (SP)	;A1=p->manager
BEQ	R0,R0,80800CB4	;quick advance
ADDIU	A2,R0,000A	;A2= +10
//80800CB0:	normal advance rate
ADDIU	A2,R0,0001	;A2= +1
//80800CB4:
ADDIU	A0,R0,0400	;A0= +down
SW	V1,001C (SP)	;SP+1C=V1: shirt#
SW	A1,0020 (SP)	;SP+20=A1: p->manager
JAL	80078D30	;V0=TRUE if buttons A0 pressed on controller 1
SW	A2,0018 (SP)
LW	V1,001C (SP)
LW	A1,0020 (SP)	;A1=p->manager
BEQ	V0,R0,80800D24
LW	A2,0018 (SP)
ADDIU	A0,R0,0400	;A0= +down
SW	V1,001C (SP)	;SP+1C=V1: shirt#
SW	A1,0020 (SP)	;SP+20=A1: p->manager
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
SW	A2,0018 (SP)
LW	V1,001C (SP)
LW	A1,0020 (SP)	;A1=p->manager
BEQ	V0,R0,80800D08	;branch if not pressed
LW	A2,0018 (SP)
ADDIU	T8,R0,FFF0
SW	T8,0228 (A1)
ADDU	V1,V1,A2
LW	T9,0228 (A1)
ADDIU	AT,R0,0006
ADDIU	T0,T9,0001
BNE	T0,AT,80800D24
SW	T0,0228 (A1)
SW	R0,0228 (A1)
ADDU	V1,V1,A2
ADDIU	A0,R0,0800	;A0= +up
SW	V1,001C (SP)	;SP+1C=V1: new shirt#
SW	A1,0020 (SP)	;SP+20=A1: p->manager
JAL	80078D30	;V0=TRUE if buttons A0 pressed on controller 1
SW	A2,0018 (SP)
LW	V1,001C (SP)
LW	A1,0020 (SP)	;A1=p->manager
BEQ	V0,R0,80800D94
LW	A2,0018 (SP)
ADDIU	A0,R0,0800	;A0= +up
SW	V1,001C (SP)	;SP+1C=V1: shirt#
SW	A1,0020 (SP)	;SP+20=A1: p->manager
JAL	80078DAC	;V0=nonzero if buttons A0 pressed
SW	A2,0018 (SP)
LW	V1,001C (SP)
LW	A1,0020 (SP)	;A1=p->manager
BEQ	V0,R0,80800D78	;branch if not pressed
LW	A2,0018 (SP)
ADDIU	T2,R0,0010
SW	T2,0228 (A1)
SUBU	V1,V1,A2
LW	T3,0228 (A1)
ADDIU	AT,R0,FFFA
ADDIU	T4,T3,FFFF
BNE	T4,AT,80800D94
SW	T4,0228 (A1)
SW	R0,0228 (A1)
SUBU	V1,V1,A2
BGEZ	V1,80800DA8
LUI	T7,8013
ADDIU	V1,V1,00FF
BLTZL	V1,80800DA0
ADDIU	V1,V1,00FF
SLTI	AT,V1,00FF
BNE	AT,R0,80800DC4
NOP
ADDIU	V1,V1,FF01
SLTI	AT,V1,00FF
BEQL	AT,R0,80800DB8
ADDIU	V1,V1,FF01
LW	T7,6FD8 (T7)	;T7=80136FD8: p->playerdata
ADDIU	T6,V1,2401
SH	T6,0A78 (T7)
LW	RA,0014 (SP)
ADDIU	SP,SP,0020
JR	RA
NOP

80800DE0	use appropriate interface
	accepts: A0=p->manager
ADDIU	SP,SP,FFE8
SW	RA,0014 (SP)
LUI	T6,8013
LW	T6,7440 (T6)	;T6=80137440: 
BLTZL	T6,80800E0C	;branch if negative
LW	T7,0208 (A0)
JAL	808000A4
NOP
BEQ	R0,R0,80800E28
LW	RA,0014 (SP)
//80800E08:	use proper interface
LW	T7,0208 (A0)	;T7=manager+208: cur.interface
LUI	T9,8080
SLL	T8,T7,0x2
ADDU	T9,T9,T8
LW	T9,1D7C (T9)	;T9=80801D7C+offset: cur.interface routine
JALR	RA,T9
NOP
//80800E24:	return
LW	RA,0014 (SP)
ADDIU	SP,SP,0018
JR	RA
NOP

80800E34
ADDIU	SP,SP,FFE0
SW	RA,001C (SP)
SW	A0,0020 (SP)
LW	A0,0020 (SP)
ADDIU	A1,R0,000A
JAL	8002AEEC
ADDIU	A2,R0,000F
ADDIU	T6,R0,00FF
SW	T6,0010 (SP)	;SP+10=FF	alpha
LW	A0,0020 (SP)
ADDIU	A1,R0,00FF
ADDIU	A2,R0,00FF
JAL	8002AE7C	;set text A0's colour to (A1,A2,A3,SP+10)
ADDIU	A3,R0,00FF
JAL	8002C9AC
NOP
LUI	AT,4140
MTC1	AT,F4
LUI	A2,8080
LUI	A1,8080
MUL.S	F6,F0,F4
ADDIU	A1,A1,2260
LW	A0,0020 (SP)
TRUNC.W.S	F8,F6
MFC1	T8,F8
NOP
SLL	T9,T8,0x2
ADDU	A2,A2,T9
JAL	8002B770	;fprintf(A0,A1,...)
LW	A2,1D8C (A2)
LW	RA,001C (SP)
ADDIU	SP,SP,0020
JR	RA
NOP

80800EBC
ADDIU	SP,SP,FFB8
SW	S3,002C (SP)
SW	S1,0024 (SP)
OR	S1,A1,R0
OR	S3,A0,R0
SW	RA,0044 (SP)
SW	S8,0040 (SP)
SW	S7,003C (SP)
SW	S6,0038 (SP)
SW	S5,0034 (SP)
SW	S4,0030 (SP)
SW	S2,0028 (SP)
SW	S0,0020 (SP)
ADDIU	T6,R0,00FF
SW	T6,0010 (SP)	;SP+10=FF	alpha
OR	A0,S1,R0	;A0=S1: p->txt.buffer
ADDIU	A1,R0,00FF
ADDIU	A2,R0,009B
JAL	8002AE7C	;set text A0's colour to (A1,A2,A3,SP+10)
ADDIU	A3,R0,0096
OR	A0,S1,R0	;A0=S1: p->txt.buffer
ADDIU	A1,R0,000C
JAL	8002AEEC
ADDIU	A2,R0,0002
LUI	A1,8080
ADDIU	A1,A1,2264	;A1=80802264: "FOREST MAP SELECT"
JAL	8002B770	;fprintf(A0,A1,...)
OR	A0,S1,R0	;A0=S1: p->txt.buffer
ADDIU	T7,R0,00FF
SW	T7,0010 (SP)	;SP+10=FF	alpha
OR	A0,S1,R0	;A0=S1: p->txt.buffer
ADDIU	A1,R0,00FF
ADDIU	A2,R0,00FF
JAL	8002AE7C	;set text A0's colour to (A1,A2,A3,SP+10)
ADDIU	A3,R0,00FF
LUI	S7,8080
LUI	S5,8080
ADDIU	S5,S5,1B60
ADDIU	S7,S7,2278	;S7=80802278	"**NULL**
OR	S0,R0,R0
ADDIU	S8,R0,000F
ADDIU	S6,R0,000C
ADDIU	S4,R0,0023
OR	A0,S1,R0	;A0=S1: p->txt.buffer
ADDIU	A1,R0,0005
JAL	8002AEEC
ADDIU	A2,S0,0004
LW	T8,0220 (S3)
LW	T1,021C (S3)
OR	A0,S1,R0	;A0=S1: p->txt.buffer
ADDU	T9,T8,S0
ADDIU	T0,T9,0023
DIV	T0,S4
MFHI	S2
ADDIU	A1,R0,00C8
BNE	S4,R0,80800FA4
NOP
BREAK	00001C00
//80800FA4:
ADDIU	AT,R0,FFFF
BNE	S4,AT,80800FBC
LUI	AT,8000
BNE	T0,AT,80800FBC
NOP
BREAK	00001800
//80800FBC:
ADDIU	A2,R0,00C8
BNE	S2,T1,80801018
ADDIU	A3,R0,0037
LW	T2,0208 (S3)	;T2=manager+208: cur.interface
OR	A0,S1,R0	;A0=S1: p->txt.buffer
ADDIU	A1,R0,00FF
BEQ	T2,R0,80801000	;branch if interface=options pane
ADDIU	A2,R0,0014
ADDIU	T3,R0,00FF
SW	T3,0010 (SP)	;SP+10=FF	alpha
OR	A0,S1,R0	;A0=S1: p->txt.buffer
ADDIU	A1,R0,00FF
ADDIU	A2,R0,0078
JAL	8002AE7C	;set text A0's colour to (A1,A2,A3,SP+10)
ADDIU	A3,R0,0078
BEQ	R0,R0,80801024
NOP
ADDIU	T4,R0,00FF
SW	T4,0010 (SP)	;SP+10=FF	alpha
JAL	8002AE7C	;set text A0's colour to (A1,A2,A3,SP+10)
ADDIU	A3,R0,0014
BEQ	R0,R0,80801024
NOP
ADDIU	T5,R0,00FF
JAL	8002AE7C	;set text A0's colour to (A1,A2,A3,SP+10)
SW	T5,0010 (SP)	;SP+10=FF	alpha
MULTU	S2,S6
OR	A0,S1,R0	;A0=S1: p->txt.buffer
LUI	A1,8080
MFLO	T6
ADDU	T7,S5,T6
LW	A2,0000 (T7)
BNE	A2,R0,80801048
NOP
OR	A2,S7,R0	;A2=S7: "**Null**"
//80801048:
JAL	8002B770	;fprintf(A0,A1,...)
ADDIU	A1,A1,2260	;A1=80802260: "%s"
ADDIU	S0,S0,0001
BNEL	S0,S8,80800F6C
OR	A0,S1,R0	;A0=S1: p->txt.buffer
//8080105C:	return
LW	RA,0044 (SP)
LW	S0,0020 (SP)
LW	S1,0024 (SP)
LW	S2,0028 (SP)
LW	S3,002C (SP)
LW	S4,0030 (SP)
LW	S5,0034 (SP)
LW	S6,0038 (SP)
LW	S7,003C (SP)
LW	S8,0040 (SP)
JR	RA
ADDIU	SP,SP,0048

8080108C
ADDIU	SP,SP,FFE8
SW	RA,0014 (SP)
SW	A0,0018 (SP)
SW	A1,001C (SP)
LW	A0,0018 (SP)
ADDIU	A1,R0,0017
JAL	8002AEEC
ADDIU	A2,R0,0006
LUI	A1,8080
ADDIU	A1,A1,2290
JAL	8002B770	;fprintf(A0,A1,...)
LW	A0,0018 (SP)
LW	RA,0014 (SP)
ADDIU	SP,SP,0018
JR	RA
NOP

808010CC	
ADDIU	SP,SP,FFD8
SW	S1,0020 (SP)
SW	S0,001C (SP)
OR	S0,A0,R0
OR	S1,A2,R0
SW	RA,0024 (SP)
SW	A1,002C (SP)
OR	A0,S0,R0
ADDIU	A1,R0,0017
JAL	8002AEEC
ADDIU	A2,R0,0007
LBU	T6,0003 (S1)
LUI	A1,8080
LHU	A2,0006 (S1)
LBU	A3,0005 (S1)
ADDIU	A1,A1,229C	;A1=8080229C: ""
OR	A0,S0,R0
JAL	8002B770	;fprintf(A0,A1,...)
SW	T6,0010 (SP)
//80801118:
OR	A0,S0,R0
ADDIU	A1,R0,0021
JAL	8002AEEC
ADDIU	A2,R0,0007
LBU	T7,0004 (S1)
LUI	A2,8080
SLTIU	AT,T7,0007
BEQL	AT,R0,80801148
ADDIU	A2,A2,22AC	;A2=808022AC: 
SLL	T7,T7,0x2
ADDU	A2,A2,T7
ADDIU	A2,A2,22B0	;A2=808022B0+offset: 
//80801148:
LUI	A1,8080
ADDIU	A1,A1,22CC	;A1=808022CC: ""
JAL	8002B770	;fprintf(A0,A1,...)
OR	A0,S0,R0
//80801158:
OR	A0,S0,R0
ADDIU	A1,R0,001C
JAL	8002AEEC
ADDIU	A2,R0,0008
LUI	A1,8080
ADDIU	A1,A1,22D4	;A1=808022D4: ""
OR	A0,S0,R0
LBU	A2,0002 (S1)
JAL	8002B770	;fprintf(A0,A1,...)
LBU	A3,0001 (S1)
//80801180:
LW	T8,002C (SP)
ADDIU	AT,R0,0002
OR	A0,S0,R0
LW	T9,0208 (T8)	;T9=manager+208: cur.interface
ADDIU	A1,R0,00FF
ADDIU	A2,R0,00B4
BNE	T9,AT,808012A8	;return if not interface 2: edit date/time
ADDIU	A3,R0,00B4
//808011A0:	handle specific time/date component
ADDIU	T0,R0,00FF
JAL	8002AE7C	;set text A0's colour to (A1,A2,A3,SP+10)
SW	T0,0010 (SP)	;SP+10=FF	alpha
LW	T1,002C (SP)
LW	T2,020C (T1)	;T2=S2+20C: selected time component
SLTIU	AT,T2,0005
BEQ	AT,R0,808012A8	;return if not a valid component
SLL	T2,T2,0x2
LUI	AT,8080
ADDU	AT,AT,T2
LW	T2,2440 (AT)	;T2=80802440+offset: p->interface for each component
JR	T2
NOP
OR	A0,S0,R0
ADDIU	A1,R0,0017
JAL	8002AEEC
ADDIU	A2,R0,0007
LUI	A1,8080
ADDIU	A1,A1,22E0	;A1=808022E0: ""
OR	A0,S0,R0
JAL	8002B770	;fprintf(A0,A1,...)
LHU	A2,0006 (S1)
BEQ	R0,R0,808012AC
LW	RA,0024 (SP)
//80801200:
OR	A0,S0,R0
ADDIU	A1,R0,001C
JAL	8002AEEC
ADDIU	A2,R0,0007
LUI	A1,8080
ADDIU	A1,A1,22E8	;A1=808022E8: ""
OR	A0,S0,R0
JAL	8002B770	;fprintf(A0,A1,...)
LBU	A2,0005 (S1)
BEQ	R0,R0,808012AC
LW	RA,0024 (SP)
//8080122C:
OR	A0,S0,R0
ADDIU	A1,R0,001F
JAL	8002AEEC
ADDIU	A2,R0,0007
LUI	A1,8080
ADDIU	A1,A1,22E8	;A1=808022E8: ""
OR	A0,S0,R0
JAL	8002B770	;fprintf(A0,A1,...)
LBU	A2,0003 (S1)
BEQ	R0,R0,808012AC
LW	RA,0024 (SP)
//80801258:
OR	A0,S0,R0
ADDIU	A1,R0,001C
JAL	8002AEEC
ADDIU	A2,R0,0008
LUI	A1,8080
ADDIU	A1,A1,22E8	;A1=808022E8: ""
OR	A0,S0,R0
JAL	8002B770	;fprintf(A0,A1,...)
LBU	A2,0002 (S1)
BEQ	R0,R0,808012AC
LW	RA,0024 (SP)
//80801284:
OR	A0,S0,R0
ADDIU	A1,R0,001F
JAL	8002AEEC
ADDIU	A2,R0,0008
LUI	A1,8080
ADDIU	A1,A1,22E8	;A1=808022E8: ""
OR	A0,S0,R0
JAL	8002B770	;fprintf(A0,A1,...)
LBU	A2,0001 (S1)
//808012A8:	return
LW	RA,0024 (SP)
LW	S0,001C (SP)
LW	S1,0020 (SP)
JR	RA
ADDIU	SP,SP,0028

...fill...

8080131C
ADDIU	SP,SP,FFE0
SW	RA,0014 (SP)
SW	A0,0020 (SP)
SW	A1,0024 (SP)
JAL	800D5090
ADDIU	A0,SP,0018
LW	A0,0020 (SP)
LW	A1,0024 (SP)
JAL	808010CC
ADDIU	A2,SP,0018
LW	RA,0014 (SP)
ADDIU	SP,SP,0020
JR	RA
NOP

80801354	display step
ADDIU	SP,SP,FFE8
SW	RA,0014 (SP)
SW	A0,0018 (SP)	;SP+18=A0: p->target
LW	A0,0018 (SP)
ADDIU	A1,R0,0017
JAL	8002AEEC
ADDIU	A2,R0,0009
//80801370:	print string
LUI	A1,8080
ADDIU	A1,A1,22F0	;A1=808022F0: "Step   : **m**s"
JAL	8002B770	;fprintf(A0,A1,...)
LW	A0,0018 (SP)	;A0=SP+18: p->target
//80801380:	return
LW	RA,0014 (SP)
ADDIU	SP,SP,0018
JR	RA
NOP

80801390	redirect to 80801354: display step
ADDIU	SP,SP,FFE8
SW	RA,0014 (SP)
SW	A1,001C (SP)
JAL	80801354
NOP
LW	RA,0014 (SP)
ADDIU	SP,SP,0018
JR	RA
NOP

808013B4	display weather
	accepts: A0=p->target, A1=p->manager
ADDIU	SP,SP,FFE8
SW	RA,0014 (SP)
SW	A0,0018 (SP)	;SP+18=A0: p->target
SW	A1,001C (SP)
LW	A0,0018 (SP)
ADDIU	A1,R0,0017
JAL	8002AEEC
ADDIU	A2,R0,000A
//808013D4:	print string
LUI	T6,8013
LH	T6,740C (T6)	;T6=8013740C: weather
LUI	A2,8080
LUI	A1,8080
SLL	T7,T6,0x2	;T7=T6*4: type->offset
ADDU	A2,A2,T7
LW	A2,1DBC (A2)	;A2=80801DBC+offset: p->weather.str
ADDIU	A1,A1,2300	;A1=80802300: "Weather: %s"
JAL	8002B770	;fprintf(A0,A1,...)
LW	A0,0018 (SP)	;A0=SP+18: p->target
//808013FC:	return
LW	RA,0014 (SP)
ADDIU	SP,SP,0018
JR	RA
NOP

8080140C	display gender
	accepts: A0=p->target, A1=p->manager
ADDIU	SP,SP,FFE8
SW	RA,0014 (SP)
SW	A0,0018 (SP)	;SP+18=A0: p->target
SW	A1,001C (SP)
LW	A0,0018 (SP)
ADDIU	A1,R0,0017
JAL	8002AEEC
ADDIU	A2,R0,000B
//8080142C:	print string
LUI	T6,8013
LW	T6,6FD8 (T6)	;T6=80136FD8: p->playerdata
LUI	A2,8080
LUI	A1,8080
LB	T7,0010 (T6)	;T7=playerdata+10: gender
ADDIU	A1,A1,2334	;A1=80802334: "Gender : %s"
LW	A0,0018 (SP)	;A0=SP+18: p->target
SLL	T8,T7,0x2	;T8=T7*4: gender->offset
ADDU	A2,A2,T8
JAL	8002B770	;fprintf(A0,A1,...)
LW	A2,1DD0 (A2)	;A2=80801DD0+offset: p->gender.str
//80801458:	return
LW	RA,0014 (SP)
ADDIU	SP,SP,0018
JR	RA
NOP

80801468	display shirt
	accepts: A0=p->target, A1=p->manager
ADDIU	SP,SP,FFE0
SW	RA,001C (SP)
SW	A0,0020 (SP)	;SP+20=A0: p->target
SW	A1,0024 (SP)	;SP+24=A1: selection
LW	A0,0020 (SP)
ADDIU	A1,R0,0017
JAL	8002AEEC
ADDIU	A2,R0,000F
//80801488:	set colour if selected
LW	T6,0024 (SP)	:T6=SP+24: selection
ADDIU	AT,R0,0003
LW	A0,0020 (SP)	;A0=SP+20: p->target
LW	T7,0208 (T6)	;T7=manager+208: cur.interface
ADDIU	A1,R0,00FF	;A1=FF	red
ADDIU	A2,R0,00B4	;A2=B4	green
BNE	T7,AT,808014B4	;branch if not interface 3: edit shirt
ADDIU	A3,R0,00B4	;A3=B4	blue
ADDIU	T8,R0,00FF
JAL	8002AE7C	;set text A0's colour to (A1,A2,A3,SP+10)
SW	T8,0010 (SP)	;SP+10=FF	alpha
//808014B4:	print string
LUI	T9,8013
LW	T9,6FD8 (T9)	;T9=80136FD8: p->playerdata
LUI	A1,8080
ADDIU	A1,A1,234C	;A1=8080234C: "Shirt  : %03d"
LHU	A2,0A78 (T9)	;A2=playerdata+A78: shirt
LW	A0,0020 (SP)	;A0=SP+20: p->target
JAL	8002B770	;fprintf(A0,A1,...)
ADDIU	A2,A2,DC00	;A2-=2400: ID->value
//808014D4:	return
LW	RA,001C (SP)
ADDIU	SP,SP,0020
JR	RA
NOP

808014E4	display bee sting status
	accepts: A0=p->target, A1=p->manager
ADDIU	SP,SP,FFE0
SW	RA,0014 (SP)
SW	A1,0024 (SP)	;SP+24=A1: p->manager
LUI	T6,8013
LB	T6,78D8 (T6)	;T6=801378D8: beesting
ADDIU	A1,R0,0017
ADDIU	A2,R0,000D
SW	A0,0020 (SP)	;SP+20=A0: p->target
JAL	8002AEEC
SW	T6,001C (SP)	;SP+1C=T6: beesting
//8080150C:	print string
LW	T7,001C (SP)	;T7=SP+1C: beesting
LW	A0,0020 (SP)	;A0=SP+20: p->target
LUI	A1,8080
BNE	T7,R0,80801534	;stung if nonzero
NOP
//80801520:	not stung
LUI	A1,8080
JAL	8002B770	;fprintf(A0,A1,...)
ADDIU	A1,A1,235C	;A1=8080235C: "Bee Sting: Not Stung"
BEQ	R0,R0,80801540
LW	RA,0014 (SP)
//80801534:	stung
JAL	8002B770	;fprintf(A0,A1,...)
ADDIU	A1,A1,2370	;A1=80802370: "Bee Sting: Stung"
//8080153C:	return
LW	RA,0014 (SP)
ADDIU	SP,SP,0020
JR	RA
NOP

8080154C	display data source
	accepts: A0=p->target, A1=p->manager
ADDIU	SP,SP,FFE0
SW	RA,0014 (SP)
SW	A1,0024 (SP)	;SP+24=A1: p->manager
LUI	T6,8013
LB	T6,7680 (T6)	;T6=80137680: data source
ADDIU	A1,R0,0017
ADDIU	A2,R0,000E
SW	A0,0020 (SP)	;SP+20=A0: p->target
JAL	8002AEEC
SW	T6,001C (SP)	;SP+1C=T6: data source
//80801574:	print string
LW	T7,001C (SP)	;T7=SP+1C: data source
LW	A0,0020 (SP)	;A0=SP+20: p->target
LUI	A1,8080
BNE	T7,R0,8080159C	;branch if nonzero
NOP
//80801588:	
LUI	A1,8080
JAL	8002B770	;fprintf(A0,A1,...)
ADDIU	A1,A1,2380	;A1=80802380: "Data: ???"
BEQ	R0,R0,808015A8
LW	RA,0014 (SP)
//8080159C:
JAL	8002B770	;fprintf(A0,A1,...)
ADDIU	A1,A1,2394	;A1=80802394: "Data: ???"
//808015A4:	return
LW	RA,0014 (SP)
ADDIU	SP,SP,0020
JR	RA
NOP

808015B4	display face type
	accepts: A0=p->target, A1=p->manager
ADDIU	SP,SP,FFE8
SW	RA,0014 (SP)
SW	A0,0018 (SP)	;SP+18=A0: p->target
SW	A1,001C (SP)	;SP+1C=A1: p->manager
LW	A0,0018 (SP)
ADDIU	A1,R0,0017
JAL	8002AEEC
ADDIU	A2,R0,000C
//808015D4:	print string
LUI	T6,8013
LW	T6,6FD8 (T6)	;T6=80136FD8: p->playerdata
LUI	A2,8080
LUI	A1,8080
LB	T7,0011 (T6)	;T7=playerdata+11: face type
ADDIU	A1,A1,23AC	;A1=808023AC: "Face   : type %s"
LW	A0,0018 (SP)	;A0=SP+18: p->target
SLL	T8,T7,0x2	;T8=T7*4: type->offset
ADDU	A2,A2,T8
JAL	8002B770	;fprintf(A0,A1,...)
LW	A2,1DD8 (A2)	;A2=80801DD8+offset: pointer table: p->type.str
//80801600:	return
LW	RA,0014 (SP)
ADDIU	SP,SP,0018
JR	RA
NOP

80801610	display event
	accepts: A0=p->target, A1=p->manager
ADDIU	SP,SP,FFE8
SW	RA,0014 (SP)
SW	A0,0018 (SP)	;SP+18=A0: p->target
SW	A1,001C (SP)	;SP+1C=A1: p->manager
LW	A0,0018 (SP)
ADDIU	A1,R0,0017
JAL	8002AEEC
ADDIU	A2,R0,0010
//80801630:	print string
LUI	A1,8080
LUI	A2,8080
LW	A2,1DF8 (A2)	;A2=80801DF8: p->"---"
ADDIU	A1,A1,23E0	;A1=808023E0: "Event  : %s"
JAL	8002B770	;fprintf(A0,A1,...)
LW	A0,0018 (SP)	;A0=SP+18: p->target
//80801648:	return
LW	RA,0014 (SP)
ADDIU	SP,SP,0018
JR	RA
NOP

80801658
	accepts: A0=p->???
ADDIU	SP,SP,FF88
SW	S8,0040 (SP)
SW	S3,0038 (SP)
OR	S3,A0,R0	;A0=S3: 
OR	S8,SP,R0
SW	RA,0044 (SP)
SW	S4,003C (SP)
SW	S2,0034 (SP)
SW	S1,0030 (SP)
SW	S0,002C (SP)
LW	S0,0000 (S3)
LW	V1,0298 (S0)
LUI	T7,DB06
OR	A0,S0,R0
ADDIU	T6,V1,0008
SW	T6,0298 (S0)
SW	R0,0004 (V1)
SW	T7,0000 (V1)
SW	R0,0010 (SP)
SW	S0,0074 (S8)
OR	A1,R0,R0
OR	A2,R0,R0
JAL	800BDBB4
OR	A3,R0,R0
ADDIU	T8,R0,00F0
ADDIU	T9,R0,0140
ADDIU	S0,S3,00E0
OR	A0,S0,R0
SW	T9,0060 (S8)
SW	T8,0058 (S8)
SW	R0,0054 (S8)
SW	R0,005C (S8)
JAL	800CAB30
ADDIU	A1,S8,0054
OR	A0,S0,R0
JAL	800CB018
ADDIU	A1,R0,000F
JAL	800BD748
LW	A0,0074 (S8)
ADDIU	SP,SP,FFD0
ADDIU	S1,SP,0018
JAL	8002B65C
OR	A0,S1,R0
LW	T0,0074 (S8)
OR	A0,S1,R0
JAL	8002B6EC
LW	A1,0298 (T0)
OR	A0,S3,R0
JAL	80800EBC
OR	A1,S1,R0
ADDIU	T1,R0,00FF
SW	T1,0010 (SP)	;SP+10=FF	alpha
OR	A0,S1,R0
ADDIU	A1,R0,00C8
ADDIU	A2,R0,00C8
JAL	8002AE7C	;set text A0's colour to (A1,A2,A3,SP+10)
ADDIU	A3,R0,0037
OR	A0,S1,R0
ADDIU	A1,R0,001A
JAL	8002AEEC
ADDIU	A2,R0,0004
LUI	A1,8080
ADDIU	A1,A1,2284	;A1=80802284: "-settings-"
JAL	8002B770	;fprintf(A0,A1,...)
OR	A0,S1,R0	;A0=S1: p->target
LUI	S2,8080
ADDIU	S2,S2,1E14	;S2=80801E14: pointer table for settings
OR	S0,R0,R0
ADDIU	S4,R0,000A
LW	T2,0210 (S3)
OR	A0,S1,R0
ADDIU	A1,R0,00FF
BNE	S0,T2,808017D0
ADDIU	A2,R0,00FF
LW	T3,0208 (S3)	;T3=manager+208: cur.interface
OR	A0,S1,R0
ADDIU	A1,R0,0078
BNE	T3,R0,808017B8
ADDIU	A2,R0,0078
ADDIU	T4,R0,00FF
SW	T4,0010 (SP)	;SP+10=FF	alpha
OR	A0,S1,R0
ADDIU	A1,R0,00B4
ADDIU	A2,R0,00B4
JAL	8002AE7C	;set text A0's colour to (A1,A2,A3,SP+10)
ADDIU	A3,R0,00FF
BEQ	R0,R0,808017E4
LW	T9,0000 (S2)
ADDIU	T5,R0,00FF
SW	T5,0010 (SP)	;SP+10=FF	alpha
JAL	8002AE7C	;set text A0's colour to (A1,A2,A3,SP+10)
ADDIU	A3,R0,00FF
BEQ	R0,R0,808017E4
LW	T9,0000 (S2)
ADDIU	T6,R0,00FF
SW	T6,0010 (SP)	;SP+10=FF	alpha
JAL	8002AE7C	;set text A0's colour to (A1,A2,A3,SP+10)
ADDIU	A3,R0,0037
LW	T9,0000 (S2)
OR	A0,S1,R0	;A0=S1: p->target
OR	A1,S3,R0	;A1=S3: 
JALR	RA,T9		;display setting element
NOP
ADDIU	S0,S0,0001
BNE	S0,S4,8080176C
ADDIU	S2,S2,0004
JAL	8002B720
OR	A0,S1,R0
LW	T7,0074 (S8)
OR	A0,S1,R0
JAL	8002B6E4
SW	V0,0298 (T7)
LW	RA,0044 (S8)
OR	SP,S8,R0
LW	S0,002C (S8)
LW	S1,0030 (S8)
LW	S2,0034 (S8)
LW	S3,0038 (S8)
LW	S4,003C (S8)
LW	S8,0040 (S8)
JR	RA
ADDIU	SP,SP,0078

80801840
ADDIU	SP,SP,FF98
SW	S8,0038 (SP)
OR	S8,SP,R0
SW	RA,003C (SP)
SW	S1,0034 (SP)
SW	S0,0030 (SP)
SW	A0,0068 (SP)
LW	T6,0068 (S8)
OR	A1,R0,R0
OR	A2,R0,R0
LW	S1,0000 (T6)
LW	V1,0298 (S1)
LUI	T8,DB06
OR	A0,S1,R0
ADDIU	T7,V1,0008
SW	T7,0298 (S1)
SW	R0,0004 (V1)
SW	T8,0000 (V1)
OR	A3,R0,R0
JAL	800BDBB4
SW	R0,0010 (SP)
LW	S0,0068 (S8)
ADDIU	T9,R0,00F0
ADDIU	T0,R0,0140
ADDIU	S0,S0,00E0
OR	A0,S0,R0
SW	T0,0050 (S8)
SW	T9,0048 (S8)
SW	R0,0044 (S8)
SW	R0,004C (S8)
JAL	800CAB30
ADDIU	A1,S8,0044
OR	A0,S0,R0
JAL	800CB018
ADDIU	A1,R0,000F
JAL	800BD748
OR	A0,S1,R0
ADDIU	SP,SP,FFD0
ADDIU	S0,SP,0018
JAL	8002B65C
OR	A0,S0,R0
OR	A0,S0,R0
JAL	8002B6EC
LW	A1,0298 (S1)
JAL	80800E34
OR	A0,S0,R0
JAL	8002B720
OR	A0,S0,R0
SW	V0,0298 (S1)
JAL	8002B6E4
OR	A0,S0,R0
LW	RA,003C (S8)
OR	SP,S8,R0
LW	S0,0030 (S8)
LW	S1,0034 (S8)
LW	S8,0038 (S8)
JR	RA
ADDIU	SP,SP,0068

80801928
	accepts: A0=p->???
ADDIU	SP,SP,FFB8
SW	RA,001C (SP)
SW	A0,0048 (SP)	;SP+48=A0: p->???
LW	T6,0048 (SP)	;T6=A0: 
OR	A1,R0,R0
OR	A2,R0,R0
LW	T7,0000 (T6)
OR	A3,R0,R0
SW	T7,0044 (SP)
LW	T8,0044 (SP)
LW	V1,0298 (T8)
LUI	T0,DB06
ADDIU	T9,V1,0008
SW	T9,0298 (T8)
SW	R0,0004 (V1)
SW	T0,0000 (V1)
LW	A0,0044 (SP)
JAL	800BDBB4
SW	R0,0010 (SP)
LW	A0,0048 (SP)	;A0=SP+48: 
ADDIU	T1,R0,00F0
ADDIU	T2,R0,0140
ADDIU	A0,A0,00E0
SW	A0,0024 (SP)
SW	T2,0034 (SP)
SW	T1,002C (SP)
SW	R0,0028 (SP)
SW	R0,0030 (SP)
JAL	800CAB30
ADDIU	A1,SP,0028
LW	A0,0024 (SP)
JAL	800CB018
ADDIU	A1,R0,000F
//808019AC:
LW	A0,0048 (SP)	;A0=SP+48: 
LBU	T3,009F (A0)
BNE	T3,R0,808019CC
NOP
JAL	80801840
NOP
BEQ	R0,R0,808019D8
LW	RA,001C (SP)
//808019CC:	display settings
JAL	80801658
NOP
//808019D4:	return
LW	RA,001C (SP)
ADDIU	SP,SP,0048
JR	RA
NOP

808019E4
	accepts: A0=p->???
ADDIU	SP,SP,FFE0
SW	RA,0014 (SP)
SW	A0,0020 (SP)	;SP+20=A0: 
JAL	80800DE0	;use appropriate interface
LW	A0,0020 (SP)	;A0=SP+20: 
//808019F8:
JAL	80801928
LW	A0,0020 (SP)	;A0=SP+20: 
//80801A00:
LW	A0,0020 (SP)	;A0=SP+20: 
LW	A1,0000 (A0)
JAL	800D2F74
SW	A1,0018 (SP)
//80801A10:
JAL	800D321C
LW	A0,0018 (SP)
//80801A18:	return
LW	RA,0014 (SP)
ADDIU	SP,SP,0020
JR	RA
NOP

80801A28	simple return
SW	A0,0000 (SP)	;SP+0=A0
JR	RA
NOP

80801A34	!entry point!
	accepts: A0=p->manager
ADDIU	SP,SP,FFD0
SW	S2,0020 (SP)
OR	S2,A0,R0	;S2=A0: p->manager
SW	RA,002C (SP)
SW	S4,0028 (SP)
SW	S3,0024 (SP)
SW	S1,001C (SP)
SW	S0,0018 (SP)
LUI	T6,8080
LUI	T7,8080
ADDIU	T6,T6,19E4	;T6=808019E4: 
ADDIU	T7,T7,1A28	;T7=80801A28: no function
ADDIU	T8,R0,0009
SW	T6,0004 (S2)	;T6->manager+4: 
SW	T7,0008 (S2)	;T7->manager+8: 
SW	R0,0208 (S2)	;0->manager+208: set interface: options pane
SW	T8,0210 (S2)
SW	R0,0214 (S2)
SW	R0,0218 (S2)
SW	R0,0220 (S2)
SW	R0,021C (S2)
ADDIU	A0,S2,00E0
JAL	800CA90C
LW	A1,0000 (S2)
ADDIU	T9,R0,000A
LUI	S4,8013
SW	T9,0200 (S2)
SW	R0,0234 (S2)
SW	R0,0238 (S2)
SW	R0,023C (S2)
ADDIU	S4,S4,6EA0	;S4=80136EA0: runtime variables
OR	S0,R0,R0
OR	S1,S2,R0
ADDIU	S3,R0,0006
LW	T0,0138 (S4)	;T0=80136FD8: p->playerdata
ADDU	T1,T0,S0
JAL	8080007C
LBU	A0,0000 (T1)
ADDIU	S0,S0,0001
ADDIU	S1,S1,0001
BNE	S0,S3,80801ABC
SB	V0,022B (S1)
LUI	V1,8014
ADDIU	V1,V1,8E50
LW	T2,0000 (V1)
LH	V0,1434 (T2)
BLTZ	V0,80801B0C
SLTI	AT,V0,0023
BEQ	AT,R0,80801B0C
NOP
SW	V0,021C (S2)
LW	T3,0000 (V1)
LH	T4,1436 (T3)
SW	T4,0220 (S2)
JAL	800D32DC
ADDIU	A0,R0,0001
LUI	T5,8012
LW	T5,6EB4 (T5)
LW	T7,0138 (S4)
SB	R0,04AD (S4)
ADDIU	T6,R0,03E8
SW	T5,0004 (S4)
JAL	800AA124
SW	T6,003C (T7)
LW	RA,002C (SP)
LW	S0,0018 (SP)
LW	S1,001C (SP)
LW	S2,0020 (SP)
LW	S3,0024 (SP)
LW	S4,0028 (SP)
JR	RA
ADDIU	SP,SP,0030

